export default{
    state:{
        name:'zhangsan'
    },
    mutations:{
        updataName(state,payload){
            // state.name = "lisi" 
            state.name = payload  
        }
    },
    actions:{
       aUpdateName(context){
          window.console.log(context);
           setTimeout(()=>{
            context.commit('updataName','wangwu')
           },1000)
      
       }
    },
    getters:{
        fullname(state){
            return state.name + "1111"
        },
        fullname2(state,getters){
            return getters.fullname + "222"
        },
        fullname3(state,getters,rootState){
            return getters.fullname2 + rootState.counter
        }
    }
}